<?php require_once('../Connections/locale.php'); ?>
<?php
mysql_select_db($database_locale, $locale);
$query_numeri = "SELECT numeri.id_numero, riviste.descrizione as rivista, numeri.identificativo_numero, numeri.`data`, numeri.descrizione FROM numeri, riviste WHERE numeri.id_rivista = riviste.id_rivista";
$numeri = mysql_query($query_numeri, $locale) or die(mysql_error());
$row_numeri = mysql_fetch_assoc($numeri);
$totalRows_numeri = mysql_num_rows($numeri);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>

<body>
<fieldset>
<legend>Elenco Numeri</legend>
<table border="1" id="datatable">
  <tr>
    <td>ID</td>
    <td>Rivista</td>
    <td>Identificativo</td>
    <td>Uscita</td>
    <td>Descrizione</td>
    <td><a href="inserisci_numero.php"><img src="../images/page.gif" width="18" height="18" border="0"></a></td>
    <td></td>
	    <td></td>    <td></td>
  </tr>
  <?php do { ?>
  <tr>
    <td><?php echo $row_numeri['id_numero']; ?></td>
    <td><?php echo $row_numeri['rivista']; ?></td>
    <td><?php echo $row_numeri['identificativo_numero']; ?></td>
    <td><?php echo $row_numeri['data']; ?></td>
    <td><?php echo $row_numeri['descrizione']; ?></td>
	    <td><a href="visualizza_numero.php?id_numero=<?php echo $row_numeri['id_numero']; ?>"><img src="../images/visualizza.png" width="16" height="16" border="0"></a></td>
    <td><img src="../images/elimina.png" width="16" height="16"></td>
	    <td><a href="pdf_numero.php?id_numero=<?php echo $row_numeri['id_numero']; ?>"><img src="../images/pdf.gif" width="16" height="16" border="0"></a></td>
		    <td><a href="excel_numero.php?id_numero=<?php echo $row_numeri['id_numero']; ?>"><img src="../images/xls.gif" width="16" height="16" border="0"></a></td>

  </tr>
  <?php } while ($row_numeri = mysql_fetch_assoc($numeri)); ?>
</table>
</fieldset>
</body>
</html>
<?php
mysql_free_result($numeri);
?>
